package com.chenlei.openfeign.OpenFignController;

import com.chenlei.openfeign.feign.OrderFeginService;
import com.chenlei.openfeign.feign.StockFeignInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.rowset.spi.SyncResolver;

@RestController
@RequestMapping("/openfeign")
public class OrderOpenFeignController {

    @Autowired
    StockFeignInterface stockFeignInterface;
    @Autowired
    OrderFeginService orderFeginService;
    @RequestMapping("/add")
    public String getOpenFeign(){
        String msg = stockFeignInterface.addStock();
        return "openfeign add"+msg;
    }

    @RequestMapping("/getuser")
    public String getuserFeigin(){
        String msg = orderFeginService.getuser("1314520");
        return "openfeign add"+msg;
    }
}
